package com.yulong.web.mapper;


import com.rabbitmq.http.client.domain.UserInfo;
import com.yulong.model.pojo.UmsAdmin;
import com.yulong.model.pojo.UmsAdminRoleRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UmsAdminMapper {
     //查询所有用户
     List<UserInfo> selectAll();
     //分页查询用户
     List<UmsAdmin> selectList(@Param(value = "username") String username);
     //插入用户
     int register(UmsAdmin user);
     //根据用户名查询用户
     UmsAdmin queryByUserName(String username);
     //根据Id查询用户角色表
     List<UmsAdminRoleRelation> queryByAdminId(Long adminId);
     //根据Id删除用户角色表
     int deleteRoleByAdminId(List<Long> list);
     //根据id删除用户
     int deleteById(String id);
     //根据id更新用户
     int updateById(UmsAdmin user);
     //为用户分配权限
     int updateRole(Long adminId, List<Integer> roleIds);
     //停用启用用户
     int updateByStatus(Long id,Long status);

}
